function example() {
  let x: string | number | boolean

  x = Math.random() < 0.5

  if(Math.random() < 0.5) {
    x = 'hello'
  } else {
    x = 100
  }
  return x
}

let x1 = example()
x1 = 'hello'
x1 = 100
// x1 = true  // x:boolean 被覆盖了     